import { reactive } from "vue";
import { Item } from "./type"
import { useForm } from "@ant-design-vue/use";
const form = reactive<Item>({
    sjtgcs: "",
    sjtgfpt: "",
    sjlx: "",
    sjms: "",
    sjmc: "",
    sjwjdx: "",
    ip: "",
    wjgs: "",
    wjwldz: "",
});

const rulesRef = reactive({
    sjtgcs: [{ required: true, message: "" }],
    sjtgfpt: [{ required: true, message: "" }],
    sjlx: [{ required: true, message: "" }],
    sjms: [{ required: true, message: "" }],
    sjmc: [{ required: true, message: "" }],
    sjwjdx: [{ required: true, message: "" }],
    ip: [{ required: true, message: "" }],
    wjgs: [{ required: true, message: "" }],
    wjwldz: [{ required: true, message: "" }],
})

export const { resetFields, validate, validateInfos } = useForm(form, rulesRef);
export default form;